Optimal. Leaf size=157 \[ -\frac{2 (A b-a B) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{a^2 d}+\frac{2 \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \left (A b^2-a (b B-a C)\right ) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a^2 d (a+b)}+\frac{2 A \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.288498, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.163, Rules used = {4106, 3849, 2805, 3787, 3771, 2639, 2641} \[ \frac{2 \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} \left (A b^2-a (b B-a C)\right ) \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right )}{a^2 d (a+b)}-\frac{2 (A b-a B) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac{2 A \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4106
Rule 3849
Rule 2805
Rule 3787
Rule 3771
Rule 2639
Rule 2641
Rubi steps
\begin{align*} \int \frac{A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt{\sec (c+d x)} (a+b \sec (c+d x))} \, dx &=\frac{\int \frac{a A-(A b-a B) \sec (c+d x)}{\sqrt{\sec (c+d x)}} \, dx}{a^2}+\frac{\left (A b^2-a b B+a^2 C\right ) \int \frac{\sec ^{\frac{3}{2}}(c+d x)}{a+b \sec (c+d x)} \, dx}{a^2}\\ &=\frac{A \int \frac{1}{\sqrt{\sec (c+d x)}} \, dx}{a}-\frac{(A b-a B) \int \sqrt{\sec (c+d x)} \, dx}{a^2}+\frac{\left (\left (A b^2-a b B+a^2 C\right ) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{1}{\sqrt{\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a^2}\\ &=\frac{2 \left (A b^2-a (b B-a C)\right ) \sqrt{\cos (c+d x)} \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{a^2 (a+b) d}+\frac{\left (A \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \sqrt{\cos (c+d x)} \, dx}{a}-\frac{\left ((A b-a B) \sqrt{\cos (c+d x)} \sqrt{\sec (c+d x)}\right ) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx}{a^2}\\ &=\frac{2 A \sqrt{\cos (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{a d}-\frac{2 (A b-a B) \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{a^2 d}+\frac{2 \left (A b^2-a (b B-a C)\right ) \sqrt{\cos (c+d x)} \Pi \left (\frac{2 a}{a+b};\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{\sec (c+d x)}}{a^2 (a+b) d}\\ \end{align*}
Mathematica [F] time = 13.2909, size = 0, normalized size = 0. \[ \int \frac{A+B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt{\sec (c+d x)} (a+b \sec (c+d x))} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 2.664, size = 323, normalized size = 2.1 \begin{align*} 2\,{\frac{\sqrt{ \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{-2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1}}{ \left ( a-b \right ){a}^{2}\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sin \left ( 1/2\,dx+c/2 \right ) \sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}d} \left ( A{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) ab-A{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ){b}^{2}+A{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ){a}^{2}-A{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) ab+A{\it EllipticPi} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,2\,{\frac{a}{a-b}},\sqrt{2} \right ){b}^{2}-B{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ){a}^{2}+B{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) ab-B{\it EllipticPi} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,2\,{\frac{a}{a-b}},\sqrt{2} \right ) ab+C{\it EllipticPi} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,2\,{\frac{a}{a-b}},\sqrt{2} \right ){a}^{2} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt{\sec \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{A + B \sec{\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}}{\left (a + b \sec{\left (c + d x \right )}\right ) \sqrt{\sec{\left (c + d x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A}{{\left (b \sec \left (d x + c\right ) + a\right )} \sqrt{\sec \left (d x + c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]